﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [Table(Name = "xunjianshuju")]
    public class XunJianShuJu
    {
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [Column(Name = "rwid")]
        [Description("任务ID")]
        [JsonProperty("rwid")]
        public long Rwid { get; set; }

        [Column(Name = "sbid")]
        [Description("设备ID")]
        [JsonProperty("sbid")]
        public long Sbid { get; set; }

        [Column(Name = "xjsj", DbType = "datetime(0)")]
        [Description("巡检时间")]
        [JsonProperty("xjsj")]
        public DateTime Xjsj { get; set; }

        [Column(Name = "duty")]
        [Description("班值")]
        [JsonProperty("duty")]
        public string Duty { get; set; }

        [Column(Name = "shift")]
        [Description("班次")]
        [JsonProperty("shift")]
        public string Shift { get; set; }

        [Column(Name = "inspector")]
        [Description("巡检人员")]
        [JsonProperty("inspector")]
        public string Inspector { get; set; }

        [Column(Name = "xjlx")]
        [Description("巡检路线")]
        [JsonProperty("xjlx")]
        public string Xjlx { get; set; }

        [Column(Name = "xjsb")]
        [Description("巡检设备")]
        [JsonProperty("xjsb")]
        public string Xjsb { get; set; }

        [Column(Name = "xjbz", StringLength = -1)]
        [Description("巡检标准")]
        [JsonProperty("xjbz")]
        public string Xjbz { get; set; }

        [Column(Name = "status")]
        [Description("巡检状态")]
        [JsonProperty("status")]
        public string Status { get; set; }

        [Column(Name = "result")]
        [Description("巡检数据结果")]
        [JsonProperty("result")]
        public string Result { get; set; }

        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime CreateTime { get; set; }

        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime UpdateTime { get; set; }
    }
}
